'use strict';
const Koa = require('koa');
const logger = require('koa-logger');
const bodyParser = require('koa-bodyparser');
const router = require('koa-router')();

const app = new Koa();

app.keys = ['keys', 'keykeys'];

// log requests
app.use(logger());

// parse request body:
app.use(bodyParser());

require('./controllers/c.js')(router);

app.use(router.routes());
// listen
module.exports = app;